<?php

include_once 'Classes/PHPCodeProvider.php';

/*
 * Create a new assignment BinaryOperatorExpression
 */

$expression = new BinaryOperatorExpression(BinaryOperator::ASSIGN);
$expression->Left = new VariableReferenceExpression('score');
$expression->Right = new PrimitiveExpression(0);

$options = new CodeGeneratorOptions();
$writer = new IndentedTextWriter();
$provider = new PHPCodeProvider();

$provider->generateCodeFromExpression($expression, $writer, $options);

echo '<pre>' . 
    str_replace('<br />', '', highlight_string($writer->get_String(), true)) 
        . '<pre/>';

/*
 * The output should be:
 * 
 * $score = 0
 * 
 */

?>
